package com.cdream.basic.util;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;

import java.util.Collection;
import java.util.Map;

/**
 * @author cdream
 * @date 2020-06-14
 */
public class CollUtilExample {
    public static void main(String[] args) {
        // 交集
        Collection<Integer> intersection = CollUtil.newArrayList(); //CollUtil.intersection(List.of(1, 2, 3, 4), List.of(3, 2, 3, 1, 5));
        System.out.println(intersection);
        // 建造方法
        Map<String, String> map = MapUtil.<String, String>builder().put("name", "小白").build();
        // 明确初始容量
        Map<String, String> map1 = MapUtil.newHashMap();


    }
}
